#ifndef DATA_GLOBALMAP_H
#define DATA_GLOBALMAP_H

#include "ieditableglobalmap.hpp"
#include "cell.hpp"

namespace Data {

class GlobalMap : public IEditableGlobalMap
{
public:
    GlobalMap();
    virtual ~GlobalMap();

    uint width() const;
    uint height() const;
    const ICell &cell(uint x, uint y) const;

    void create(uint width, uint height);
    IEditableCell &editableCell(uint x, uint y);

private:
    uint cind(uint x, uint y) const;

    uint _width;
    uint _height;
    std::vector<Cell> _cells;
};

} // namespace Data

#endif // DATA_GLOBALMAP_H
